package com.dly.hope.model.vo;

import com.dly.hope.modle.Group;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import org.hibernate.annotations.Comment;

import javax.persistence.Column;

@Data
@ApiModel
public class GroupVo {

    private String groupId;

    private String groupNumber;

    private String groupMaster;

    private String name;

    private String avatar;

    public static GroupVo toVo(Group group){
        GroupVo groupVo = new GroupVo();
        groupVo.setGroupMaster(group.getGroupMaster());
        groupVo.setName(group.getName());
        groupVo.setGroupId(group.getId());
        groupVo.setAvatar(group.getAvatar());
        groupVo.setGroupNumber(group.getGroupNumber());
        return groupVo;
    }
}
